const Mock = require('mockjs')
// 处理前端传来的参数
function handleData (res: any) {
  return JSON.parse(res.body)
}
const token = Mock.mock({
  token: /^0x[a-f0-9]{18}$/// 16进制随机数
})
// const token = 'fjiero456ref4fref4r4f55d5d6d54vf5ddef45d5f5d'
Mock.mock(/user\/login/, 'post', (res: any) => {
  const res1 = handleData(res)
  console.log(res1)
  return token
})
